import { createRouter, createWebHistory } from "vue-router";

const modules = import.meta.glob('./module/*.ts')

const routes = []
for (const key in modules) {
    const module: any = await modules[key]();
    routes.push(...module.default)
}

const router = createRouter({
    history: createWebHistory(import.meta.env.BASE_URL),
    routes: routes,
});

export default router;
